package demo5.controller;

import demo5.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Controller 将来用于和用户打交到（与浏览器交互部分）
 * UserController负责处理来自用户的请求
 */
@Controller
public class UserController {
    @Autowired
    private IUserService userService;

    public void doLogin(){
        System.out.println("UserController: 收到用户的请求，要求登录");
        boolean success=userService.login("张三", "123456");
        if (success){
            System.out.println("UserController:回馈用户登录成功，提示");
        }else {
            System.out.println("UserController:回馈用户登录失败，提示");
        }



    }
}
